package com.little.pattern.observer;

/**
 * Created by littleshu on 18/5/5.
 */
public class XiaoHong implements Observer {
    private Subject subject;

    @Override
    public void update() {
        learn();
    }

    public void tell(Subject subject) {
        this.subject = subject;
        this.subject.registerObserver(this);
    }

    public void readStory() {
        System.out.println("小红在看小说");
    }

    public void learn() {
        System.out.println("小红开始装做学习");
    }
}
